package com.jyw.business.obstacles.enums;

import com.google.common.collect.Lists;
import com.jyw.business.obstacles.constant.OrderCurrStateConstant;
import com.jyw.business.obstacles.constant.OrderDealTypeConstant;
import lombok.Data;

import java.util.List;

public enum TempEnum {
    /**
     * 其他
     */
    MANUAL_CREATE(Lists.newArrayList(2,3,5),Lists.newArrayList(OrderCurrStateConstant.WAIT_DELIVERY)),
    /**
     * 微信报修
     */
    WECHAT_CREATE(Lists.newArrayList(4),Lists.newArrayList(OrderCurrStateConstant.WAIT_DELIVERY)),
    /**
     *电话报修
     */
    PHONE_CREATE(Lists.newArrayList(0,1,2)),
    /**
     *已接
     */
    PICKED_UP(Lists.newArrayList(0)),
    /**
     * 未接
     */
    MISSED(Lists.newArrayList(2)),
    /**
     * 待派单
     */
    WAIT_DELIVERY(null,Lists.newArrayList(OrderCurrStateConstant.WAIT_DELIVERY)),
    /**
     *待建单
     */
    UNTENITED(Lists.newArrayList(0),Boolean.FALSE),
    /**
     *电话找人
     */
    FIND_SOMEONE(OrderDealTypeConstant.END_LOOK),
    /**
     * 电话解决
     */
    END_PHONE(OrderDealTypeConstant.END_PHONE),
    /**
     * 待接单
     */
    WAIT_ACCEPT(null,Lists.newArrayList(OrderCurrStateConstant.WAIT_ACCEPT)),
    /**
     * 处理中
     */
    PROCESSING(null,Lists.newArrayList(OrderCurrStateConstant.PROCESSING)),
    /**
     * 待派单,待接单,处理中
     */
    BUILT_ORDER(null,Lists.newArrayList(OrderCurrStateConstant.WAIT_DELIVERY,OrderCurrStateConstant.WAIT_ACCEPT,OrderCurrStateConstant.PROCESSING)),
    /**
     * 完成待审
     */
    WAIT_AUDIT(null,Lists.newArrayList(OrderCurrStateConstant.WAIT_AUDIT)),
    /**
     * 工单升级
     */
    TRANSFORM(null,Lists.newArrayList(OrderCurrStateConstant.END_UPGRADE)),
    /**
     * 终止
     */
    TERMINATED(null,Lists.newArrayList(OrderCurrStateConstant.TERMINATED)),
    /**
     * 暂停
     */
    SUSPENDED(null,Lists.newArrayList(OrderCurrStateConstant.SUSPENDED)),
    /**
     * 待评价
     */
    WAIT_APPRAISAL(null,Lists.newArrayList(OrderCurrStateConstant.WAIT_APPRAISAL)),
    /**
     * 未通过
     */
    NOT_PASS_AUDIT(null,Lists.newArrayList(OrderCurrStateConstant.NOT_PASS_AUDIT)),
    /**
     * 结束
     */
    ENDED(null,Lists.newArrayList(OrderCurrStateConstant.ENDED
            ,OrderCurrStateConstant.END_UPGRADE
            ,OrderCurrStateConstant.END_DEMAND
            ,OrderCurrStateConstant.END_TASK
    )),
    /**
     * 评价结果
     */
    EVALUATE_RESULT(null,Lists.newArrayList(OrderCurrStateConstant.ENDED)),
    /**
     * 已建单
     */
    CREATE_ORDER(OrderDealTypeConstant.CREATE_ORDER);

    /**
     * 工单来源
     */
    private List<Integer> sourceList;
    /**
     * 电话报修
     */
    private List<String> currState;
    /**
     * 呼叫类型
     */
    private List<Integer> callType;

    private Boolean hasDealType;

    private String dealType;

    /**
     * 评价结果
     */
    private List<Integer> evaluateResultList;

    TempEnum(List<Integer> sourceList, List<String> currState) {
        this.sourceList = sourceList;
        this.currState = currState;
    }

    TempEnum(List<Integer> callType) {
        this.callType = callType;
    }

    TempEnum(List<Integer> callType, Boolean hasDealType) {
        this.callType = callType;
        this.hasDealType = hasDealType;
    }

    TempEnum(String dealType) {
        this.dealType = dealType;
    }

    public List<Integer> getSourceList() {
        return sourceList;
    }

    public List<String> getCurrState() {
        return currState;
    }

    public List<Integer> getCallType() {
        return callType;
    }

    public Boolean getHasDealType() {
        return hasDealType;
    }

    public String getDealType() {
        return dealType;
    }

    public String getName(){
        return super.toString();
    }

    public List<Integer> getEvaluateResultList() {
        return evaluateResultList;
    }

    public void setEvaluateResultList(List<Integer> evaluateResultList) {
        this.evaluateResultList = evaluateResultList;
    }
}
